Masked Types: Technical report

نویسندگان

  • Xin Qi
  • Andrew C. Myers
چکیده

This paper presents a type-based solution to the long-standing problem of object initialization. Constructors, the conventional mechanism for object initialization, have semantics that are surprising to programmers and that lead to bugs. They also contribute to the problem of null-pointer exceptions, which make software less reliable. Masked types are a new type-state mechanism that explicitly tracks the initialization state of objects and prevents reading from uninitialized fields. In the resulting language, constructors are ordinary methods that operate on uninitialized objects, and no special default value (null) is needed in the language. Initialization of cyclic data structures is achieved with the use of conditionally masked types. Masked types are modular and compatible with data abstraction. The type system is presented in a simplified object calculus and is proved to soundly prevent reading from uninitialized fields. Masked types have been implemented as an extension to Java, in which compilation simply erases extra type information. Experience using the extended language suggests that masked types work well on real code.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Sensorimotor supremacy: Investigating conscious and unconscious vision by masked priming

According to the sensorimotor supremacy hypothesis, conscious perception draws on motor action. In the present report, we will sketch two lines of potential development in the field of masking research based on the sensorimotor supremacy hypothesis. In the first part of the report, evidence is reviewed that masked, invisible stimuli can affect motor responses, attention shifts, and semantic pro...

متن کامل

Volvulus Associated with Pregnancy : A Review & Report of One Case

SUMMARY Volvulus associated with pregnancy & puerperi- um though rare, has to be exciuded as a cause of abdominal pain Diagnosis is difficult because the clinical signs are often masked. Delay in diagnos is may have serious consequences for mother & fetus. A case of volvulus associated with pregnancy is being reported and literature are briefly reviewed. Significant symptoms and signs and usef...

متن کامل

Technical Variations in Low-Input RNA-seq Methodologies

Recent advances in RNA-seq methodologies from limiting amounts of mRNA have facilitated the characterization of rare cell-types in various biological systems. So far, however, technical variations in these methods have not been adequately characterized, vis-à-vis sensitivity, starting with reduced levels of mRNA. Here, we generated sequencing libraries from limiting amounts of mRNA using three ...

متن کامل

Existential Types for Imperative Languages: Technical Results

This technical report contains the full type-safety proof for the language presented in the paper Existential Types for Imperative Languages, originally submitted for publication in October 2001. Because this report should be read only after the paper, effectively as an appendix, we do not repeat the motivation, examples, and informal presentation contained there. Also refer to the paper for re...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2008